#include "http_util.h"

void return_http_error(struct evhttp_request* req,const char* msg)
{
    struct evbuffer* retbuff = evbuffer_new();
    evhttp_add_header(evhttp_request_get_output_headers(req),
        "Content-Type", "text/plain");
    evbuffer_add_printf(retbuff, msg);
    evhttp_send_reply(req, HTTP_INTERNAL, msg, retbuff);
    evbuffer_free(retbuff);
}
